package com.nanshututeng;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.weixin4j.message.OutputMessage;
import org.weixin4j.message.normal.*;
import org.weixin4j.message.output.TextOutputMessage;
import org.weixin4j.spi.INormalMessageHandler;

/**
 * Created by Administrator on 2018-09-09.
 */
public class AtsNormalMessageHandler implements INormalMessageHandler {
    protected final Logger LOG = LoggerFactory.getLogger(AtsNormalMessageHandler.class);

    @Override
    public OutputMessage textTypeMsg(TextInputMessage msg) {
        LOG.debug("文本消息：" + msg.getContent());
        TextOutputMessage out = new TextOutputMessage();
        out.setContent("您发的消息是：" + msg.getContent());
        return out;
    }

    @Override
    public OutputMessage imageTypeMsg(ImageInputMessage imageInputMessage) {
        TextOutputMessage out = new TextOutputMessage();
        out.setContent("你的消息已经收到！");
        return out;
    }

    @Override
    public OutputMessage voiceTypeMsg(VoiceInputMessage voiceInputMessage) {
        return null;
    }

    @Override
    public OutputMessage videoTypeMsg(VideoInputMessage videoInputMessage) {
        return null;
    }

    @Override
    public OutputMessage shortvideoTypeMsg(ShortVideoInputMessage shortVideoInputMessage) {
        return null;
    }

    @Override
    public OutputMessage locationTypeMsg(LocationInputMessage locationInputMessage) {
        return null;
    }

    @Override
    public OutputMessage linkTypeMsg(LinkInputMessage linkInputMessage) {
        return null;
    }
}
